package com.zzyl.task;

import com.zzyl.entity.Reservation;
import com.zzyl.mapper.CustomerReservationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.util.List;

@Component
public class Timing {
    @Autowired
   private CustomerReservationMapper customerReservationMapper;

    @Scheduled(cron = "* 1,31 * * * ?")
    public void AutomaticUpdates() {
        //对所有的任务进行状态更新
        customerReservationMapper.AutoOverdue();
    }

}
